#/bin/bash
for f in *.html
do
    i=1
    fn=''
    dn=''
    var=`echo $f|sed "s/_/ /g"`
    for fv in $var
    do
        if [ $i -eq 1 ];then
            dn=$fv
        fi
        if [ $i -eq 2 ]; then
            fn=$fv
        fi
        if [ $i -eq 3 ]; then
            fn=${fn}_${fv}
            echo $i
        fi
      let "i+=1"
    done
    `mkdir -p $dn`
    `mv $f ${dn}/${fn}`
    echo "mv $f ${dn}/${fn}"
done
